import java.util.Scanner;
public class test3 {
    public static void main(String[] args){
    System.out.println("输入一个十进制整数:");
    Scanner s=new Scanner(System.in);
    int i=s.nextInt();
    s.close();
     int p=i;
    String binary="";
    if(i>0){
        while(i!=0){
            int a=i%2;
            binary=a+binary;
            i/=2;
        }
        System.out.println(p+"的绝对值是:"+p);
        System.out.println(p+"的二进制是:"+binary);
    }
    else if(i==0){
        int b=i%2;
        binary=b+binary;
        System.out.println(p+"的绝对值是:"+p);
        System.out.println(p+"的二进制是:"+binary);
    }
    else{
        p=0-p;
        i=0-i;
        //int j=~(Integer.parseInt(binary));
        System.out.println(p+"的绝对值是:"+p);
        //System.out.println(j);
    }
 }
}